How to combine multiple Rules on the same query.
director
as an attribute for faceting and providing a refinement list with its own search input on your frontend.
Yet, an even better way of helping your users would be to make your search smart and look only for movies where director
is equal to “Clint Eastwood” whenever they type “clint eastwood director”. To achieve this, you first need to set director
in your list of attributes for faceting. Then, you can create a new Rule that filters on matching attributes.
You need to create two consequences whenever a user types in “clint eastwood director”:
director
as attributesForFaceting
. This happens at indexing time.
director:'Clint Eastwood'
.saveRule
method.
director
attribute from the dropdown.{facet:director}
should then be displayed.{facet:director}
.